#include "led_device.h"
#include "driver_led.h"
#include <string.h>


static void LedInit(struct ledDevice *pDev)
{
    LED_GPIO_Init(pDev);
}


static int LedCtl(struct ledDevice *pDev , int status)
{
    return LedSetStatus(pDev, status);
}


static ledDevice ledNum[2] = {
	{"LED_BLUE", 1, LedInit, LedCtl},
	{"LED_YELLOW", 1, LedInit, LedCtl},
};


pLedDevice GetLedDevice(char *name)
{
    if(strcmp(name, "LED_BLUE") == 0)
    {
        return &ledNum[0];
    }
    else if(strcmp(name, "LED_YELLOW") == 0)
    {    
        return &ledNum[1];
    }
    else 
		return NULL;
}

